{extend name='Public:content'/}
{block name='title'}文章分类{/block}
{block name='content'}
<div class="row animated fadeIn">
    <div class="row">
        <div class="col-md-4">
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab-first" role="tab" data-toggle="tab">分类列表
                        <button class="btn btn-success btn-rounded btn-sm">{$termNums}</button>
                    </a></li>
                    <li><a href="#tab-second" role="tab" data-toggle="tab">添加分类</a></li>
                </ul>
                <div class="panel-body tab-content">
                    <div class="tab-pane active" id="tab-first">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>分类名称</th>
                                <th>描述</th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name='termList' id='v'}
                            <tr class="del_tr">
                                <td>{$v.lefthtml}{$v.name}</td>
                                <td>{$v.description}</td>
                                <td>
                                    <a title="{$v.name}【编辑】" data-url="{:url('admin/Posts/edit_page_term',['term_id'=>$v.term_id])}" onclick="edit_row(this)"  class="btn btn-default btn-rounded btn-sm"><span class="fa fa-pencil"></span></a>
                                    <button data-url="{:url('admin/Posts/del_think_term',['term_id'=>$v.term_id])}" onClick="delete_row(this);" class="btn btn-danger btn-rounded btn-sm" ><span class="fa fa-trash-o"></span></button>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" id="tab-second">
                        <form id="add_form" action="{:url('admin/Posts/add_think_term')}" method="post" class="form-horizontal">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-md-10">
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">上级</label>
                                            <div class="col-md-9">
                                                <select name="path" class="form-control select">
                                                    <option value="0">作为一级菜单</option>
                                                    {volist name='termList' id='v'}
                                                        {notempty name="$menuChild"}
                                                            <option {:is_selected($menuChild,$v.term_id)} value="{$v.term_id}">{$v.lefthtml}{$v.name}</option>
                                                            {else/}
                                                            <option value="{$v.term_id}">{$v.lefthtml}{$v.name}</option>
                                                        {/notempty}
                                                    {/volist}
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">分类名称</label>
                                            <div class="col-md-9">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                    <input type="text" name="name" class="form-control"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">描述</label>
                                            <div class="col-md-9 col-xs-12">
                                                <textarea name="description" class="form-control" rows="5"></textarea>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <button class="btn btn-info pull-right">保存添加<span class="fa fa-floppy-o fa-right"></span></button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
</script>
{/block}